1. Technical Field
The present invention relates to a method and system within a first data processing system for processing a first instruction in response to an initiation of processing within an emulation environment of a second instruction, and in particular to the establishment of a file within the emulation environment which includes a routine associated with the second instruction, the routine including an indication of the first instruction. Still more particularly, the present invention relates to a method and system for processing a first instruction utilizing parameters stored in a routine which is associated with a second instruction in response to an initiation of processing within an emulation environment of the second instruction.
2. Description of the Related Art
A data processing system is implemented utilizing a particular architecture. An architecture includes the particular hardware including the central processing unit (CPU) and the microcode which defines how the CPU operates. One example of an architecture is the Power PC architecture offered by International Business Machines Corporation, Motorola, Incorporated, and Apple Computer, Incorporated. Another example is the Pentium architecture offered by Intel Corporation.
An operating system controls the execution of programs and provides the necessary link between the architecture and a software application. Operating systems are designed to operate utilizing a particular architecture. Therefore, an operating system designed to operate utilizing one architecture cannot operate unchanged utilizing a different architecture.
Software applications are designed to be executed utilizing a particular operating system, and therefore a particular architecture. There are several methods for executing a particular software application originally written for one operating system utilizing an operating system and/or an architecture different from the original combination of operating system and architecture.
One method, which may be used in some cases, is to re-compile the software application to be executable on the new architecture. Another method is for the new architecture to emulate the original architecture.
Software applications include binary files which are files including executable code. An application programming interface (API) is a functional interface supplied by an operating system that allows a software application to use specific data or functions of the operating system. Binary files typically include calls to the application programming interface. These calls may have parameters associated with them which are needed to complete the execution of the calls. In addition, once an API call has completed processing, a parameter which indicates a result of the processing of the API call may be returned to the software application. In some cases there may be multiple parameters returned to the application upon completion of the processing of the API call.
An API call is associated with a file. The file is typically a dynamic link library (DLL) file. A DLL includes executable code and/or data which is linked to the software application when the software application is loaded.
Therefore a need exists for a method and system to process a first instruction in a first processing environment in response to an initiation of processing within an emulation environment of a second instruction.